package org.jsola.hr.dto.attendrule;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 考勤规则
 *
 * @author wxz
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【考勤规则】的参数")
@Data
public class AttendRuleAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = "公司ID", example = "")
    @NotNull(message = "公司ID不能为空")
    private String companyId;

    /** 方案名称 */
    @ApiModelProperty(notes = "规则名称", example = "")
    private String planName;

    /** 方案类型 ; 1-固定时间上下班,2-按班次上下班,3-自由上下班*/
    @ApiModelProperty(notes = "方案类型", example = "1-固定时间上下班,2-按班次上下班,3-自由上下班")
    @NotNull(message = "规则类型不能为空")
    private Integer planType;

    /** 打卡部门 */
    @ApiModelProperty(notes = "打卡部门", example = "")
    private List<AttendRuleDeptAddDTO> deptList;

    /** 打卡人员 */
    @ApiModelProperty(notes = "打卡人员", example = "")
    private List<AttendRuleStaffAddDTO> staffList;

    /** 白名单 */
    @ApiModelProperty(notes = "白名单", example = "")
    private List<AttendRuleWhitelistAddDTO> whitelist;

    /** 汇报对象 */
    @ApiModelProperty(notes = "汇报对象", example = "")
    @NotNull(message = "汇报对象不能为空")
    private List<AttendRuleReportAddDTO> reportList;

    /** 打卡地点-位置*/
    @ApiModelProperty(notes = "打卡地点-位置", example = "")
    private List<AttendRuleLocationAddDTO> locationList;

    /** 打卡地点-wifi */
    @ApiModelProperty(notes = "打卡地点-wifi", example = "")
    private List<AttendRuleWifiAddDTO> wifiList;

    /** 打卡时间 */
    @ApiModelProperty(notes = "打卡时间", example = "")
    private List<AttendRulePunchTimeAddDTO> punchTimeList;

    /** 特殊日期-必须打卡的日期 */
    @ApiModelProperty(notes = "特殊日期-必须打卡的日期", example = "")
    private List<NeedPunchDateAddDTO> needPunchDateList;

    /** 特殊日期-不必打卡的日期 */
    @ApiModelProperty(notes = "特殊日期-不必打卡的日期", example = "")
    private List<NoNeedPunchDateAddDTO> noNeedPunchDateList;

    /** 加班规则;1-以加班申请为准,2-以打卡时间为准,3-以加班申请核算打卡记录 */
    @ApiModelProperty(notes = "加班规则", example = "1-以加班申请为准,2-以打卡时间为准,3-以加班申请核算打卡记录")
    @NotNull(message = "加班规则不能为空")
    private Integer overtimeRule;

    @ApiModelProperty(notes = "工作日加班规则", example = "")
    private WorkDayRuleDTO workDayRuleDTO;

    @ApiModelProperty(notes = "非工作日加班规则", example = "")
    private NonWorkDayRuleDTO nonWorkDayRuleDTO;

    /** 是否同步中国节假日;1-是,0-否*/
    @ApiModelProperty(notes = "是否同步中国节假日", example = "1-是,0-否")
    @NotNull(message = "是否同步中国节假日不能为空")
    private Boolean isSynchLegalHoliday;

    /** 是否手机提醒;1-是,0-否 */
    @ApiModelProperty(notes = "是否手机提醒", example = "1-是,0-否")
    @NotNull(message = "是否手机提醒不能为空")
    private Boolean isRemind;

    /** 上班前x分钟. */
    @ApiModelProperty(notes = "上班前x分钟", example = "")
    private Integer remindBefore;

    /** 下班后x分钟. */
    @ApiModelProperty(notes = "下班后x分钟", example = "")
    private Integer remindAfter;

    /** 员工打卡时必须拍照;1-是,0-否 */
    @ApiModelProperty(notes = "员工打卡时必须拍照", example = "1-是,0-否 ")
    @NotNull(message = "员工打卡时必须拍照不能为空")
    private Boolean isTakePhoto;

    /** 备注不允许上传本地图片,只能拍照;1-是,0-否 */
    @ApiModelProperty(notes = "只能拍照", example = "备注不允许上传本地图片,只能拍照;1-是,0-否 ")
    private Boolean isOnlyPhoto;

    /** 范围外打卡;1-允许范围外打卡，记录为地点异常,2-允许范围外打卡，记录为正常外勤,3-不允许范围外打卡 */
    @ApiModelProperty(notes = "范围外打卡", example = "1-允许范围外打卡，记录为地点异常,2-允许范围外打卡，记录为正常外勤,3-不允许范围外打卡")
    @NotNull(message = "范围外打卡不能为空")
    private Integer punchRange;

    /** 是否补卡申请;1-是,0-否 */
    @ApiModelProperty(notes = "是否补卡申请", example = "1-是,0-否 ")
    @NotNull(message = "是否补卡申请不能为空")
    private Boolean isMakeUp;

    /** 每月不高于x下次. */
    @ApiModelProperty(notes = "每月不高于x下次", example = "")
    private Integer maxMakeUpCounts;

    /** 生效时间;1-明日生效，2-立即生效 */
    @ApiModelProperty(notes = "生效时间", example = "1-明日生效，2-立即生效")
    @NotNull(message = "生效时间不能为空")
    private Integer takeEffect;

    @ApiModelProperty(notes = "临时考勤排班ID(考勤规则类型是按班次上下班则必填)", example = "")
    private String tmpAttendShiftId;

}
